<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>layout布局页面</title>
		<script type="text/javascript" src="../../jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="../../ztree/jquery.ztree.all-3.5.js"></script>
		<link rel="stylesheet" href="../themes/default/easyui.css" />
		<link rel="stylesheet" href="../themes/icon.css" />
		<link rel="stylesheet" href="../../ztree/zTreeStyle.css" />
		<script type="text/javascript">
			$(function() {
				//自定义验证框
				$.extend($.fn.validatebox.defaults.rules, {
					minLength: {
						validator: function(value, param) {
							//alert(value+"   "+param)
							return value.length >= param[0]; //输入的文本长度大于param[0]就返回true,否则执行下面
						},
						message: 'Please enter at least {0} characters.'
					}
				});
				
				$("#saveBtn").click(function() {
					if($("#myform").form("validate")) {
						//表单校验成功,允许提交表单
						$("#myform").submit();
					}
				})
			})
		</script>
	</head>

	<body>
		<div id="mywindow" class="easyui-window" data-options="title:'窗口标题',collapsible:true,modal:true,closed:true" style="width: 200px;height: 200px;">
			窗口内容
		</div>
		<br>
		<form id="myform" name="myform" action="http://www.baidu.com">
			<input type="button" value="保存" id="saveBtn" /> <br /> 邮箱验证：
			<input type="text" name="email" class="easyui-validatebox" validtype="email" required="true" missingMessage="不能为空" invalidMessage="邮箱格式不正确" /><br/> 网址验证：
			<input type="text" name="url" class="easyui-validatebox" validtype="url" required="true" missingMessage="不能为空" /><br/> 长度验证：
			<input type="text" name="length" class="easyui-validatebox" validtype="length[8,20]" required="true" missingMessage="不能为空" invalidMessage="有效长度8-20" /><br/>
			<!--远程验证：<input type="text" name="remote" class="easyui-validatebox" validtype="remote['../standard_validate.action','name']" required="true" missingMessage="不能为空" invalidMessage="用户名已存在"/>-->
			自定义验证框<input class="easyui-validatebox" data-options="validType:'minLength[5]'"><br />
			<!--minLength传入的参数时数组,就是param[0]取传入的数组首位 -->
			数字验证框<input type="text" class="easyui-numberbox" value="100" data-options="min:0,precision:2"></input><br /> 日期验证框
			<input id="dd" type="text" class="easyui-datebox" required="required"> </input> <br /> 数据表格下拉框
			<select id="cc" class="easyui-combogrid" name="dept" style="width:250px;" data-options="    
            panelWidth:450,    
            value:'006',    
            idField:'code',    
            textField:'name',    
            url:'datagrid_data.json',    
            columns:[[    
                {field:'code',title:'Code',width:60},    
                {field:'name',title:'Name',width:100},    
                {field:'addr',title:'Address',width:120},    
                {field:'col4',title:'Col41',width:100}    
            ]]    
        "></select>

		</form>
		<br/>
	</body>

</html>